package com.performax.database.oh2game.mapper;

import java.util.List;
import java.util.HashMap;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.performax.database.Vo.*;


@Repository(value="communityInfoMapper")
public interface CommunityInfoMapper {
	
	
	List<NoticeInfoVo> 	getNoticeList();
	//board
	List<BoardInfoVo> 	getBoardList(HashMap<String, Object> param);
	int					getBoardListCnt(HashMap<String, Object> param);
	BoardDetailVo		getBoardDetail(HashMap<String, Object> param);
	List<AttachInfoVo>	getAttachInfo(@Param("boardId")int boardId);
	void				incBoardViewCnt(@Param("boardId")int boardId);
	int					getBoardViewCnt(@Param("boardId")int boardId);
	void 				regBoard(HashMap<String, Object> param); 
	void				delAllAttachFile(@Param("boardId")int boardId);
	void				delAttachFile(@Param("attachFileId")int attachFileId);
	
	void				regAttachFile(@Param("orgName")String orgName, @Param("url")String url, @Param("boardId") int boardId);
	int					updBoard(HashMap<String, Object> param);
	void				updAttachFile(HashMap<String, Object>param);
	void				delBoard(@Param("boardId")int boardId);
	void				delBoardReplyByBoardId(@Param("boardId")int boardId);
	
	//reply				
	List<ReplyInfoVo> 	getBoardReplyList(HashMap<String, Object> param);
	int					getBoardReplyListCnt(HashMap<String, Object> param);
	void				regBoardReply(HashMap<String, Object> param);
	void				updBoardReply(HashMap<String, Object> param);				
	void				incBoardReplyOrder(@Param("upperId")int upperId);
	int				delBoardReply(@Param("replyId")int boardId, @Param("upperId")int upperId);
	void				setBoardReplyCnt(@Param("boardId")int boardId, @Param("count")int count);
	HashMap<String, Object>	getBoardReply(@Param("replyId") int replyId);
	int					getBoardReplyCnt(@Param("boardId")int boardId);
	List<Integer>		getBoardReplyReportList(@Param("userId")String userId, @Param("boardId")int boardId, @Param("target")String target);
	List<Integer>		getBoardReplyRecList(@Param("userId")String userId, @Param("boardId")int boardId, @Param("target")String target);
	
	//report
	void				reportBoardReply(HashMap<String, Object> param);
	void				setReportCnt(@Param("target")String target, @Param("id")int id);
	int					getReportCnt(@Param("target")String target, @Param("id")int id);
	
	//recommend
	void				recommendBoardReply(HashMap<String, Object> param);
	void				setRecCnt(@Param("target")String target, @Param("id")int id);
	int					getRecCnt(@Param("target")String target, @Param("id")int id);
	
	//friend
	List<FriendInfoVo>	getFriendList();
	int					getFriendListCnt();
	String				getSnsAccount(@Param("userId")String userId);
	void				regFriend(@Param("snsAccntId")String snsAccntId);
	void				delFriend(@Param("snsAccntId")String snsAccntId);
	
	
	//imageUpload
	//List<ImgInfoVo>			imageUplaod();
	
    
}
